package com.bw.controller;

import com.alibaba.fastjson.JSON;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;

@Controller
public class TestController {


    @RequestMapping("/test.do")
    public String test(HttpServletRequest request) {
        Cookie[] cookies = request.getCookies();

        System.out.println("test.do 浏览器自动发送过来的cookie：" + JSON.toJSONString(cookies));
        return "test";
    }
}
